<?php
class CommonController extends BaseController {
	public function view(){
		$this->setElement('name','ybwang');
		$this->setElement('arr',array(1,2,4,7));
		$this->output('Test1.html');
	}
	public function run() {
		$db = new DB();
		$query = "select * from test";
		$db->getAttributes($query, $attrs);
		$query = "select name from test";
		$db->getOneAttribute($query,$val);
		$this->setElement('arr',$attrs);
		$this->setElement('name',$val);
		$this->output('Test2.html',1);
		$this->output('Test2.html');
	}
	public function insert() {
		/*$db = new DB();
		$query = "insert into test(name) values('songmin'),('ybwang')";
		$db->runQuery($query);*/
		Session::set('login','ybwang:aibang');
		echo Session::get('login');
		$this->error('missingAction',array());
	}
}
?>